home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 November / PCWNOV08.iso / Software / Freeware / Mini Map Sidebar 0.3 / mini_map_sidebar-0.3.0-fx.xpi / chrome / content / services.js < prev    next >
Encoding:
Text File  |  2008-07-10  |  3.4 KB  |  96 lines

  1. function switchService(service,domain,ydomain,startaddress,nodelat,nodelng,nodeurl,nodetitle,nodeaddress,nodedescription){
  2.     var url = service;
  3.     switch (url) {
  4.       case "google-to":
  5.       url = "http://"+domain+"/maps?daddr="+nodeaddress;
  6.       break;
  7.       case "yahoo-to":
  8.       url = "http://"+ydomain+"/dd?taddr="+nodeaddress;
  9.       break;
  10.       case "microsoft-to":
  11.       url = "http://local.live.com/default.aspx?rtp=adr.~adr."+nodeaddress
  12.       break;
  13.       case "multimap-to":
  14.       url = "http://multimap.com/?daddr="+nodeaddress
  15.       break;
  16.       case "mapquest-to":
  17.       url = "http://mapquest.com/?daddr="+nodeaddress
  18.       break;
  19.       case "google-from":
  20.       url = "http://"+domain+"/maps?saddr="+nodeaddress;
  21.       break;
  22.       case "yahoo-from":
  23.       url = "http://"+ydomain+"/dd?addr="+nodeaddress;
  24.       break;
  25.       case "microsoft-from":
  26.       url = "http://local.live.com/default.aspx?rtp=adr."+nodeaddress
  27.       break;
  28.       case "google-to-my":
  29.       url = "http://"+domain+"/maps?saddr="+nodeaddress+"&daddr="+startaddress;
  30.       break;
  31.       case "yahoo-to-my":
  32.       url = "http://"+ydomain+"/dd?taddr="+startaddress+"&addr="+nodeaddress;
  33.       break;
  34.       case "microsoft-to-my":
  35.       url = "http://local.live.com/default.aspx?rtp=adr."+nodeaddress+"~adr."+startaddress;
  36.       break;
  37.       case "google-from-my":
  38.       url = "http://"+domain+"/maps?saddr="+startaddress+"&daddr="+nodeaddress;
  39.       break;
  40.       case "yahoo-from-my":
  41.       url = "http://"+ydomain+"/dd?addr="+startaddress+"&taddr="+nodeaddress;
  42.       break;
  43.       case "microsoft-from-my":
  44.       url = "http://local.live.com/default.aspx?rtp=adr."+startaddress+"~adr."+nodeaddress;
  45.       break;
  46.       case "tagzania-post":
  47.       url = "http://www.tagzania.com/post?lat="+nodelat+"&long="+nodelng+"&resources="+nodeurl+"&title="+nodetitle+"&desc="+nodedescription;
  48.       break;
  49.       case "tagzania-nearby":
  50.       url = "http://www.tagzania.com/near/"+nodelat+"/"+nodelng;
  51.       break;
  52.       case "platial-places":
  53.       url = "http://platial.com/where?where="+nodeaddress;
  54.       break;
  55.       case "platial-add":
  56.       url = "http://www.platial.com/platialgrabber?place="+nodeaddress;
  57.       break;
  58.       case "google-earth":
  59.       url = "http://"+domain+"/maps?q="+nodeaddress+"&output=kml";
  60.       break;
  61.       case "localize":
  62.       url = "http://loc.alize.us/#/geo:" + nodelat + "," + nodelng + ",11";
  63.       break;
  64.       case "geonames":
  65.       url = "http://www.geonames.org/maps/google_"+ nodelat +"_"+ nodelng +".html";
  66.       break;
  67.       case "geourl":
  68.       url = "http://geourl.org/near/?lat="+ nodelat + ",&lon=" + nodelng +"&dist=40";
  69.       break;
  70.       case "google":
  71.       url = "http://"+domain+"/maps?q="+nodeaddress
  72.       break;
  73.       case "yahoo":
  74.       url = "http://"+ydomain+"/maps_result.php?q1="+nodeaddress
  75.       break;
  76.       case "microsoft":
  77.       url = "http://local.live.com/default.aspx?&where1="+nodeaddress
  78.       break;
  79.       case "geody":
  80.       url = "http://www.geody.com/geolook.php?world=terra&q="+nodelat+","+nodelng;
  81.       break;
  82.     case "flickr":
  83.       url = "http://www.flickr.com/map/?&tag=&m=text&fLat="+nodelat+"&fLon="+nodelng+"&zl=6&map_type=sat";
  84.       break;
  85.     case "panoramio":
  86.       url = "http://www.panoramio.com/map/#lt="+nodelat+"&ln="+nodelng+"&z=4&k=2&a=1";
  87.       break;
  88.     case "upcoming":
  89.     url = "http://upcoming.yahoo.com/place/?loc="+nodeaddress;
  90.     break;
  91.       case "self":
  92.       url = nodeurl;
  93.       break;
  94.       }
  95. return url; 
  96. }